<?php 
$conn = mysqli_connect('127.0.0.1','root','123456','cake2');
mysqli_query($conn,'SET NAMES UTF8');
$result = mysqli_query($conn,'SELECT * FROM cake WHERE id > 14 AND id<23');
$cc = [];
while($row = mysqli_fetch_array($result)){
	array_push($cc, $row);
}

 ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>定制蛋糕</title>
</head>
<style>
	.box{
		width:1200px;
		height: 1000px;
		border: 1px red solid;
		/*overflow: hidden;*/
	}
	.r{
		width: 200px;
		height:500px;
		border: 1px black solid;
		margin-right: 10px;
		float: left;
	}
	.line{
		height: 25px;
		text-align: center;
	}
</style>
<body>
<?php include 'header.php' ?>
<div class="box">
	<?php 
			foreach ($cc as $cake2) {?> 
	<div class="r">
		<p>
			<img src="<?php echo ($cake2['img']) ?>" alt="">
		</p>
		<p class="line"><?php echo ($cake2['name']) ?></p>
		<p class="line"><?php echo ($cake2['price1']) ?></p>
		<p class="line"><?php echo ($cake2['price2']) ?></p>
		<p class="line"><?php echo ($cake2['price3']) ?></p>
		<p class="line"><?php echo ($cake2['price4']) ?></p>
		


	</div>
	<?php  }?>
</div>
	
	
</body>
</html>